package {
	import flash.display.Bitmap;
	import flash.display.Sprite;

	/**
	 * @author lenovo
	 */
	public class Pez extends Sprite {
		private var mySpeed:int = 10;
		/*private var w : int = 90;
		private var h : int = 40;*/
		private var escala: Number = 0.2;
		private var imagenPez : Sprite;
		
		[Embed(source = "../goldfish.png")]
		private var PezImg:Class;
		private var img : Bitmap = new PezImg();
		public function Pez() {
			drawImg();
		}
		
		private function drawImg():void {
			img.x = -img.width*escala/2;
			img.y = -img.height*escala/2;
			img.scaleX = escala;
			img.scaleY = escala;
//			addChild(img);
			imagenPez = new Sprite;
			imagenPez.addChild(img);	
			addChild(imagenPez);		
			
			/*graphics.beginFill(0xffcc33);
			graphics.drawEllipse(-w/2, -h/2, w, h);
			graphics.lineStyle(1,0xffcc33);
			graphics.moveTo(-(w/2), 0);
			graphics.lineTo(-(w/2+w/5),-h/2);
			graphics.lineTo(-(w/2 +w/5),h/2);
			graphics.lineTo(-(w/2), 0);
			graphics.endFill();
			graphics.beginFill(0);
			graphics.drawCircle(w/4, h/3-h/2, 3);
			graphics.drawCircle(w/4, -(h/3-h/2), 3);		
			graphics.endFill();*/
		}
		public function get speed():int {
			return mySpeed;
		}
		
		
	}
}
